/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.sonrisas.tools.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author DIEGOALV
 */
@Embeddable
public class PedidolmaterialPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idMaterial")
    private int idMaterial;
    @Basic(optional = false)
    @Column(name = "idTecnicoDental")
    private int idTecnicoDental;

    public PedidolmaterialPK() {
    }

    public PedidolmaterialPK(int idMaterial, int idTecnicoDental) {
        this.idMaterial = idMaterial;
        this.idTecnicoDental = idTecnicoDental;
    }

    public int getIdMaterial() {
        return idMaterial;
    }

    public void setIdMaterial(int idMaterial) {
        this.idMaterial = idMaterial;
    }

    public int getIdTecnicoDental() {
        return idTecnicoDental;
    }

    public void setIdTecnicoDental(int idTecnicoDental) {
        this.idTecnicoDental = idTecnicoDental;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idMaterial;
        hash += (int) idTecnicoDental;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PedidolmaterialPK)) {
            return false;
        }
        PedidolmaterialPK other = (PedidolmaterialPK) object;
        if (this.idMaterial != other.idMaterial) {
            return false;
        }
        if (this.idTecnicoDental != other.idTecnicoDental) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.PedidolmaterialPK[ idMaterial=" + idMaterial + ", idTecnicoDental=" + idTecnicoDental + " ]";
    }
    
}
